package com.mf.cloud.controller;

import com.mf.cloud.apis.PayFeignApi;
import com.mf.cloud.entites.PayDTO;
import com.mf.cloud.resp.ResultData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: lmf
 * @Create: 2024/3/18 20:55
 * Description:  调用服务链路追踪测试
 */
@RestController
@Tag(name = "测试链路追踪openfeign")
public class OrderManagementController {

    @Resource
    private PayFeignApi payFeignApi;

    /**
     * 测试查询接口
     * @param id the id of the
     */
    @GetMapping("/feign/pay/management/get/{id}")
    @Operation(summary = "测试接口")
    public ResultData<PayDTO> myManagementGetPayById(@PathVariable("id") Integer id){
        return ResultData.success(payFeignApi.getManagementPayById(id));
    }
}
